﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ModuleDefinitionManagement.ascx.cs" Inherits="Web.Cms.Modules.ModuleDefinitionManagement" %>
<table border="0" cellpadding="2" cellspacing="2" style="width: 100%">
    <tr>
        <td style="width: 443px" valign="top" class="InputBox">
            <asp:GridView ID="dtgModuleDefinitions" runat="server" AutoGenerateColumns="False" SkinID="AdminGrid"
                Width="101%" DataKeyNames="ModuleDefID" OnSelectedIndexChanged="dtgModuleDefinitions_SelectedIndexChanged" OnPageIndexChanging="dtgModuleDefinitions_PageIndexChanging" PageSize="100">
                <Columns>
                    <asp:BoundField HeaderText="Stt" >
                        <HeaderStyle Width="5%" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Title" HeaderText="Title" />
                    <asp:BoundField DataField="Description" HeaderText="M&#244; tả" />
                    <asp:TemplateField HeaderText="Thao t&#225;c">
                        <ItemStyle HorizontalAlign="Center" Width="90px" />
                        <ItemTemplate>
                            <asp:Button ID="btnEditModule" runat="server"
                                CommandName="select" SkinID="IconInfo" ToolTip="Chi tiết" />
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
        </td>
        <td valign="top" class="InputBox">
            <table border="0" cellpadding="0" cellspacing="0" style="width: 100%; height: 110px">
                <tr>
                    <td >
                        <strong>Mã:</strong></td>
                    <td>
                        <asp:TextBox ID="txtModuleDefID" runat="server" Width="38px" ReadOnly="True"></asp:TextBox></td>
                </tr>
                <tr>
                    <td >
                        <strong>Tên Module:</strong></td>
                    <td>
                        <asp:TextBox ID="txtModuleDefTitle" runat="server" Width="170px"></asp:TextBox></td>
                </tr>
                <tr>
                    <td >
                        <strong>Mô tả:</strong></td>
                    <td>
                        <asp:TextBox ID="txtModuleDefDes" runat="server" Height="57px" TextMode="MultiLine" Width="170px"></asp:TextBox></td>
                </tr>
                <tr>
                    <td >
                        <strong>Thư mục:</strong></td>
                    <td>
                        <asp:TextBox ID="txtModuleDefFolder" runat="server" Width="170px"></asp:TextBox></td>
                </tr>
                <tr>
                    <td align="center" colspan="2">
                        <asp:Button ID="btnUpdate" SkinID="AdminButtonUpdate" runat="server" ToolTip="Cập nhật" OnClick="btnUpdate_Click" />&nbsp;
                        <asp:Button ID="btnAdd" SkinID="AdminButtonInsert" runat="server" ToolTip="Thêm mới" OnClick="btnAdd_Click" />&nbsp;
                        <asp:Button ID="btnDelete" SkinID="AdminButtonDelete" runat="server" ToolTip="Xoá" OnClick="btnDelete_Click" />
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
<asp:Panel ID="pnlModules" runat="server" Visible="false">
<table border="0" cellpadding="2" cellspacing="2" style="width: 100%">
    <tr>
        <td colspan="2" valign="middle">
            <hr style="width:90%" />
        </td>
    </tr>
    <tr>
        <td valign="middle">
            <strong>Các control trong module:
                <asp:Label ID="lblModuleDefinition" runat="server"></asp:Label><br />
                </strong>
        </td>
        <td align="right">
            <asp:Button ID="btnAddModuleControl" runat="server" Text="Thêm control" CssClass="Button" Width="100px" OnClick="btnAddModuleControl_Click" />
        </td>
    </tr>
    <tr>
        <td class="InputBox" colspan="2" valign="top">
            <asp:GridView ID="dtgModules" runat="server" AutoGenerateColumns="False" SkinID="AdminGrid"
                Width="100%" DataKeyNames="ModuleID" OnRowCommand="dtgModules_RowCommand" AllowPaging="True" OnPageIndexChanging="dtgModules_PageIndexChanging">
                <Columns>
                    <asp:BoundField HeaderText="Stt" />
                    <asp:BoundField DataField="Title" HeaderText="Control" />
                    <asp:BoundField DataField="CtrlKey" HeaderText="Lệnh" />
                    <asp:BoundField DataField="CtrlSrc" HeaderText="Đường dẫn" />
                    <asp:TemplateField HeaderText="Thao t&#225;c">
                        <HeaderStyle Width="190px" />
                        <ItemStyle HorizontalAlign="Center" />
                        <ItemTemplate>
                            <asp:Button ID="btnEditControl" runat="server"
                                CommandName="editmodulecontrol" SkinID="IconInfo" ToolTip="Chi tiết" CommandArgument='<%# Eval("ModuleID") %>' />
                            <asp:Button ID="btnDeleteControl" runat="server"
                                CommandName="deletemodulecontrol" SkinID="AdminButtonDelete" ToolTip="Xóa" CommandArgument='<%# Eval("ModuleID") %>' />
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
        </td>
    </tr>
</table>
</asp:Panel>